/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package shoppinglist;

/**
 *
 * @author Sanja
 */
public class ListPost {

    
    public static int getNumber( String number){
        
       return Integer.parseInt(number.replaceAll("[a-z A-Z]", ""));
    }
    
    public static String getName (String name){
        
        return name.replaceAll("[0-9]", "").trim();
    }
    
    public static String getListPost(String name, int qty){
        return qty + "     " + name;
    }
}
